<template>
  <div>
    <p>使用方式一</p>
    <h3>最新的count值：{{ $store.state.count }}</h3>
    <h3>{{$store.getters.showNum}}</h3>
    <button @click="$store.commit('add', 1)">+1</button>
    <button @click="$store.dispatch('addAsync', 5)">+5</button>
  </div>
</template>

<script>
export default {
  data() {
    return {}
  },
  methods: {}
}
</script>

<style lang="less" scoped></style>
